import Mock from "mockjs";
import jwt from "jsonwebtoken"
let token = "Bearer"+ jwt.sign({
    username:"bearer"
},"token")
console.log(token,"---");

Mock.mock("/api/list",{
    "data|6":[
        {
            "id":"@id",
            "title":"@cword(5,8)",
            "info|15-20":[
                {
                    "id":"@id",
                    "title":"@cword(5,8)",
                    "money|100-9000":0,
                    "img":"@image(100x100,@color)",
                    "state|1":["特价","爆款","新款","贱卖"],
                    "imgData|5-9":["@image(200x200,@color)"],
                    "sales|1-10":1,
                    "original|9000-10000":2
                }
            ]
        }
    ]
})

Mock.mock("/api/login",{
    code:200,
    message:"登录成功",
    token:token
})